{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# Initial imports\n",
    "import numpy as np\n",
    "import pandas as pd \n",
    "from pandas import DataFrame, Series\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "from scipy import stats\n",
    "%matplotlib inline\n",
    "\n",
    "import random\n",
    "import urllib.request\n",
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n",
      "6\n",
      "7\n",
      "8\n",
      "9\n",
      "10\n",
      "11\n",
      "12\n",
      "13\n",
      "14\n",
      "15\n",
      "16\n",
      "17\n",
      "18\n",
      "19\n",
      "20\n",
      "21\n",
      "22\n",
      "23\n",
      "24\n",
      "25\n",
      "26\n",
      "27\n",
      "28\n",
      "29\n",
      "30\n",
      "31\n",
      "32\n",
      "33\n",
      "34\n",
      "35\n",
      "36\n",
      "37\n",
      "38\n",
      "39\n",
      "40\n",
      "41\n",
      "42\n",
      "43\n",
      "44\n",
      "45\n",
      "46\n",
      "47\n",
      "48\n",
      "49\n",
      "50\n",
      "51\n",
      "52\n",
      "53\n",
      "54\n",
      "55\n",
      "56\n",
      "57\n",
      "58\n",
      "59\n",
      "60\n",
      "61\n",
      "62\n",
      "63\n",
      "64\n",
      "65\n",
      "66\n",
      "67\n",
      "68\n",
      "69\n",
      "70\n",
      "71\n",
      "72\n",
      "73\n",
      "74\n",
      "75\n",
      "76\n",
      "77\n",
      "78\n",
      "79\n",
      "80\n",
      "81\n",
      "82\n",
      "83\n",
      "84\n",
      "85\n",
      "86\n",
      "87\n",
      "88\n",
      "89\n",
      "90\n",
      "91\n",
      "92\n",
      "93\n",
      "94\n",
      "95\n",
      "96\n",
      "97\n",
      "98\n",
      "99\n",
      "100\n",
      "101\n",
      "102\n",
      "103\n",
      "104\n",
      "105\n",
      "106\n",
      "107\n",
      "108\n",
      "109\n",
      "110\n",
      "111\n",
      "112\n",
      "113\n",
      "114\n",
      "115\n",
      "116\n",
      "117\n",
      "118\n",
      "119\n",
      "120\n",
      "121\n",
      "122\n",
      "123\n",
      "124\n",
      "125\n",
      "126\n",
      "127\n",
      "128\n",
      "129\n",
      "130\n",
      "131\n",
      "132\n",
      "133\n",
      "134\n",
      "135\n",
      "136\n",
      "137\n",
      "138\n",
      "139\n",
      "140\n",
      "141\n",
      "142\n",
      "143\n",
      "144\n",
      "145\n",
      "146\n",
      "147\n",
      "148\n",
      "149\n",
      "150\n",
      "151\n",
      "152\n",
      "153\n",
      "154\n",
      "155\n",
      "156\n",
      "157\n",
      "158\n",
      "159\n",
      "160\n",
      "161\n",
      "162\n",
      "163\n",
      "164\n",
      "165\n",
      "166\n",
      "167\n",
      "168\n",
      "169\n",
      "170\n",
      "171\n",
      "172\n",
      "173\n",
      "174\n",
      "175\n",
      "176\n",
      "177\n",
      "178\n",
      "179\n",
      "180\n",
      "181\n",
      "182\n",
      "183\n",
      "184\n",
      "185\n",
      "186\n",
      "187\n",
      "188\n",
      "189\n",
      "190\n",
      "191\n",
      "192\n",
      "193\n",
      "194\n",
      "195\n",
      "196\n",
      "197\n",
      "198\n",
      "199\n",
      "200\n",
      "201\n",
      "202\n",
      "203\n",
      "204\n",
      "205\n",
      "206\n",
      "207\n",
      "208\n",
      "209\n",
      "210\n",
      "211\n",
      "212\n",
      "213\n",
      "214\n",
      "215\n",
      "216\n",
      "217\n",
      "218\n",
      "219\n",
      "220\n",
      "221\n",
      "222\n",
      "223\n",
      "224\n",
      "225\n"
     ]
    }
   ],
   "source": [
    "base_url = \"https://sofifa.com/players?offset=\"\n",
    "offset = 0\n",
    "columns = ['ID', 'Name', 'Age', 'Photo', 'Nationality', 'Flag', 'Overall', 'Potential', 'Club', \n",
    "           'Club Logo', 'Value', 'Wage', 'Special']\n",
    "data = DataFrame(columns=columns)\n",
    "for offset in range(225):\n",
    "    url = base_url + str(offset*80)\n",
    "    source_code = requests.get(url)\n",
    "    plain_text = source_code.text\n",
    "    soup = BeautifulSoup(plain_text)\n",
    "    table_body = soup.find('tbody')\n",
    "    counter = 0\n",
    "    for row in table_body.findAll('tr'):\n",
    "        td = row.findAll('td')\n",
    "        picture = td[0].find('img').get('data-src')\n",
    "        pid = td[0].find('img').get('id')\n",
    "        nationality = td[1].find('a').get('title')\n",
    "        flag_img = td[1].find('img').get('data-src')\n",
    "        name = td[1].findAll('a')[1].text\n",
    "        age = td[2].find('div')\n",
    "        overall = td[3].text.strip()\n",
    "        potential = td[4].text.strip()\n",
    "        club = td[5].find('a').text\n",
    "        club_logo = td[5].find('img').get('data-src')\n",
    "        value = td[7].text\n",
    "        wage = td[8].text\n",
    "        special = td[17].text\n",
    "        player_data = DataFrame([[pid, name, age, picture, nationality, flag_img, overall, \n",
    "                                  potential, club, club_logo, value, wage, special]])\n",
    "        player_data.columns = columns\n",
    "        data = data.append(player_data, ignore_index=True)\n",
    "        counter+=1\n",
    "    offset+=1\n",
    "    print(offset)\n",
    "    data.to_csv('full_player_data.csv', encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "data = pd.read_csv('full_player_data.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>ID</th>\n",
       "      <th>Name</th>\n",
       "      <th>Age</th>\n",
       "      <th>Photo</th>\n",
       "      <th>Nationality</th>\n",
       "      <th>Flag</th>\n",
       "      <th>Overall</th>\n",
       "      <th>Potential</th>\n",
       "      <th>Club</th>\n",
       "      <th>Club Logo</th>\n",
       "      <th>Value</th>\n",
       "      <th>Wage</th>\n",
       "      <th>Special</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>20801</td>\n",
       "      <td>Cristiano Ronaldo</td>\n",
       "      <td>32</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/20801.png</td>\n",
       "      <td>Portugal</td>\n",
       "      <td>https://cdn.sofifa.org/flags/38.png</td>\n",
       "      <td>94</td>\n",
       "      <td>94</td>\n",
       "      <td>Real Madrid CF</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/243.png</td>\n",
       "      <td>€95.5M</td>\n",
       "      <td>€565K</td>\n",
       "      <td>2228</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>158023</td>\n",
       "      <td>L. Messi</td>\n",
       "      <td>30</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/158023.png</td>\n",
       "      <td>Argentina</td>\n",
       "      <td>https://cdn.sofifa.org/flags/52.png</td>\n",
       "      <td>93</td>\n",
       "      <td>93</td>\n",
       "      <td>FC Barcelona</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/241.png</td>\n",
       "      <td>€105M</td>\n",
       "      <td>€565K</td>\n",
       "      <td>2154</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>190871</td>\n",
       "      <td>Neymar</td>\n",
       "      <td>25</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/190871.png</td>\n",
       "      <td>Brazil</td>\n",
       "      <td>https://cdn.sofifa.org/flags/54.png</td>\n",
       "      <td>92</td>\n",
       "      <td>94</td>\n",
       "      <td>Paris Saint-Germain</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/73.png</td>\n",
       "      <td>€123M</td>\n",
       "      <td>€280K</td>\n",
       "      <td>2100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>176580</td>\n",
       "      <td>L. Suárez</td>\n",
       "      <td>30</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/176580.png</td>\n",
       "      <td>Uruguay</td>\n",
       "      <td>https://cdn.sofifa.org/flags/60.png</td>\n",
       "      <td>92</td>\n",
       "      <td>92</td>\n",
       "      <td>FC Barcelona</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/241.png</td>\n",
       "      <td>€97M</td>\n",
       "      <td>€510K</td>\n",
       "      <td>2291</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>167495</td>\n",
       "      <td>M. Neuer</td>\n",
       "      <td>31</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/167495.png</td>\n",
       "      <td>Germany</td>\n",
       "      <td>https://cdn.sofifa.org/flags/21.png</td>\n",
       "      <td>92</td>\n",
       "      <td>92</td>\n",
       "      <td>FC Bayern Munich</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/21.png</td>\n",
       "      <td>€61M</td>\n",
       "      <td>€230K</td>\n",
       "      <td>1493</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>188545</td>\n",
       "      <td>R. Lewandowski</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/188545.png</td>\n",
       "      <td>Poland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/37.png</td>\n",
       "      <td>91</td>\n",
       "      <td>91</td>\n",
       "      <td>FC Bayern Munich</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/21.png</td>\n",
       "      <td>€92M</td>\n",
       "      <td>€355K</td>\n",
       "      <td>2143</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>193080</td>\n",
       "      <td>De Gea</td>\n",
       "      <td>26</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/193080.png</td>\n",
       "      <td>Spain</td>\n",
       "      <td>https://cdn.sofifa.org/flags/45.png</td>\n",
       "      <td>90</td>\n",
       "      <td>92</td>\n",
       "      <td>Manchester United</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/11.png</td>\n",
       "      <td>€64.5M</td>\n",
       "      <td>€215K</td>\n",
       "      <td>1458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7</td>\n",
       "      <td>183277</td>\n",
       "      <td>E. Hazard</td>\n",
       "      <td>26</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/183277.png</td>\n",
       "      <td>Belgium</td>\n",
       "      <td>https://cdn.sofifa.org/flags/7.png</td>\n",
       "      <td>90</td>\n",
       "      <td>91</td>\n",
       "      <td>Chelsea</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/5.png</td>\n",
       "      <td>€90.5M</td>\n",
       "      <td>€295K</td>\n",
       "      <td>2096</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>182521</td>\n",
       "      <td>T. Kroos</td>\n",
       "      <td>27</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/182521.png</td>\n",
       "      <td>Germany</td>\n",
       "      <td>https://cdn.sofifa.org/flags/21.png</td>\n",
       "      <td>90</td>\n",
       "      <td>90</td>\n",
       "      <td>Real Madrid CF</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/243.png</td>\n",
       "      <td>€79M</td>\n",
       "      <td>€340K</td>\n",
       "      <td>2165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>9</td>\n",
       "      <td>167664</td>\n",
       "      <td>G. Higuaín</td>\n",
       "      <td>29</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/167664.png</td>\n",
       "      <td>Argentina</td>\n",
       "      <td>https://cdn.sofifa.org/flags/52.png</td>\n",
       "      <td>90</td>\n",
       "      <td>90</td>\n",
       "      <td>Juventus</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/45.png</td>\n",
       "      <td>€77M</td>\n",
       "      <td>€275K</td>\n",
       "      <td>1961</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>10</td>\n",
       "      <td>155862</td>\n",
       "      <td>Sergio Ramos</td>\n",
       "      <td>31</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/155862.png</td>\n",
       "      <td>Spain</td>\n",
       "      <td>https://cdn.sofifa.org/flags/45.png</td>\n",
       "      <td>90</td>\n",
       "      <td>90</td>\n",
       "      <td>Real Madrid CF</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/243.png</td>\n",
       "      <td>€52M</td>\n",
       "      <td>€310K</td>\n",
       "      <td>2153</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>11</td>\n",
       "      <td>192985</td>\n",
       "      <td>K. De Bruyne</td>\n",
       "      <td>26</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/192985.png</td>\n",
       "      <td>Belgium</td>\n",
       "      <td>https://cdn.sofifa.org/flags/7.png</td>\n",
       "      <td>89</td>\n",
       "      <td>92</td>\n",
       "      <td>Manchester City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/10.png</td>\n",
       "      <td>€83M</td>\n",
       "      <td>€285K</td>\n",
       "      <td>2162</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>12</td>\n",
       "      <td>192119</td>\n",
       "      <td>T. Courtois</td>\n",
       "      <td>25</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/192119.png</td>\n",
       "      <td>Belgium</td>\n",
       "      <td>https://cdn.sofifa.org/flags/7.png</td>\n",
       "      <td>89</td>\n",
       "      <td>92</td>\n",
       "      <td>Chelsea</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/5.png</td>\n",
       "      <td>€59M</td>\n",
       "      <td>€190K</td>\n",
       "      <td>1282</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>13</td>\n",
       "      <td>184941</td>\n",
       "      <td>A. Sánchez</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/184941.png</td>\n",
       "      <td>Chile</td>\n",
       "      <td>https://cdn.sofifa.org/flags/55.png</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "      <td>Arsenal</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1.png</td>\n",
       "      <td>€67.5M</td>\n",
       "      <td>€265K</td>\n",
       "      <td>2181</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>14</td>\n",
       "      <td>177003</td>\n",
       "      <td>L. Modrić</td>\n",
       "      <td>31</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/177003.png</td>\n",
       "      <td>Croatia</td>\n",
       "      <td>https://cdn.sofifa.org/flags/10.png</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "      <td>Real Madrid CF</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/243.png</td>\n",
       "      <td>€57M</td>\n",
       "      <td>€340K</td>\n",
       "      <td>2228</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>15</td>\n",
       "      <td>173731</td>\n",
       "      <td>G. Bale</td>\n",
       "      <td>27</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/173731.png</td>\n",
       "      <td>Wales</td>\n",
       "      <td>https://cdn.sofifa.org/flags/50.png</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "      <td>Real Madrid CF</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/243.png</td>\n",
       "      <td>€69.5M</td>\n",
       "      <td>€370K</td>\n",
       "      <td>2263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>16</td>\n",
       "      <td>153079</td>\n",
       "      <td>S. Agüero</td>\n",
       "      <td>29</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/153079.png</td>\n",
       "      <td>Argentina</td>\n",
       "      <td>https://cdn.sofifa.org/flags/52.png</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "      <td>Manchester City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/10.png</td>\n",
       "      <td>€66.5M</td>\n",
       "      <td>€325K</td>\n",
       "      <td>2074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>17</td>\n",
       "      <td>138956</td>\n",
       "      <td>G. Chiellini</td>\n",
       "      <td>32</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/138956.png</td>\n",
       "      <td>Italy</td>\n",
       "      <td>https://cdn.sofifa.org/flags/27.png</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "      <td>Juventus</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/45.png</td>\n",
       "      <td>€38M</td>\n",
       "      <td>€225K</td>\n",
       "      <td>1867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>18</td>\n",
       "      <td>1179</td>\n",
       "      <td>G. Buffon</td>\n",
       "      <td>39</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/1179.png</td>\n",
       "      <td>Italy</td>\n",
       "      <td>https://cdn.sofifa.org/flags/27.png</td>\n",
       "      <td>89</td>\n",
       "      <td>89</td>\n",
       "      <td>Juventus</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/45.png</td>\n",
       "      <td>€4.5M</td>\n",
       "      <td>€110K</td>\n",
       "      <td>1335</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>19</td>\n",
       "      <td>211110</td>\n",
       "      <td>P. Dybala</td>\n",
       "      <td>23</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/211110.png</td>\n",
       "      <td>Argentina</td>\n",
       "      <td>https://cdn.sofifa.org/flags/52.png</td>\n",
       "      <td>88</td>\n",
       "      <td>93</td>\n",
       "      <td>Juventus</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/45.png</td>\n",
       "      <td>€79M</td>\n",
       "      <td>€215K</td>\n",
       "      <td>2063</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>20</td>\n",
       "      <td>200389</td>\n",
       "      <td>J. Oblak</td>\n",
       "      <td>24</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/200389.png</td>\n",
       "      <td>Slovenia</td>\n",
       "      <td>https://cdn.sofifa.org/flags/44.png</td>\n",
       "      <td>88</td>\n",
       "      <td>93</td>\n",
       "      <td>Atlético Madrid</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/240.png</td>\n",
       "      <td>€57M</td>\n",
       "      <td>€82K</td>\n",
       "      <td>1290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>21</td>\n",
       "      <td>194765</td>\n",
       "      <td>A. Griezmann</td>\n",
       "      <td>26</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/194765.png</td>\n",
       "      <td>France</td>\n",
       "      <td>https://cdn.sofifa.org/flags/18.png</td>\n",
       "      <td>88</td>\n",
       "      <td>91</td>\n",
       "      <td>Atlético Madrid</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/240.png</td>\n",
       "      <td>€75M</td>\n",
       "      <td>€150K</td>\n",
       "      <td>2104</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>22</td>\n",
       "      <td>189509</td>\n",
       "      <td>Thiago</td>\n",
       "      <td>26</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/189509.png</td>\n",
       "      <td>Spain</td>\n",
       "      <td>https://cdn.sofifa.org/flags/45.png</td>\n",
       "      <td>88</td>\n",
       "      <td>90</td>\n",
       "      <td>FC Bayern Munich</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/21.png</td>\n",
       "      <td>€70.5M</td>\n",
       "      <td>€225K</td>\n",
       "      <td>2185</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>23</td>\n",
       "      <td>188567</td>\n",
       "      <td>P. Aubameyang</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/188567.png</td>\n",
       "      <td>Gabon</td>\n",
       "      <td>https://cdn.sofifa.org/flags/115.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>Borussia Dortmund</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/22.png</td>\n",
       "      <td>€61M</td>\n",
       "      <td>€165K</td>\n",
       "      <td>2078</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>24</td>\n",
       "      <td>184344</td>\n",
       "      <td>L. Bonucci</td>\n",
       "      <td>30</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/184344.png</td>\n",
       "      <td>Italy</td>\n",
       "      <td>https://cdn.sofifa.org/flags/27.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>Milan</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/47.png</td>\n",
       "      <td>€44M</td>\n",
       "      <td>€210K</td>\n",
       "      <td>1995</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>25</td>\n",
       "      <td>183907</td>\n",
       "      <td>J. Boateng</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/183907.png</td>\n",
       "      <td>Germany</td>\n",
       "      <td>https://cdn.sofifa.org/flags/21.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>FC Bayern Munich</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/21.png</td>\n",
       "      <td>€48M</td>\n",
       "      <td>€215K</td>\n",
       "      <td>1989</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>26</td>\n",
       "      <td>182493</td>\n",
       "      <td>D. Godín</td>\n",
       "      <td>31</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/182493.png</td>\n",
       "      <td>Uruguay</td>\n",
       "      <td>https://cdn.sofifa.org/flags/60.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>Atlético Madrid</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/240.png</td>\n",
       "      <td>€40M</td>\n",
       "      <td>€125K</td>\n",
       "      <td>1930</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>27</td>\n",
       "      <td>178603</td>\n",
       "      <td>M. Hummels</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/178603.png</td>\n",
       "      <td>Germany</td>\n",
       "      <td>https://cdn.sofifa.org/flags/21.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>FC Bayern Munich</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/21.png</td>\n",
       "      <td>€48M</td>\n",
       "      <td>€215K</td>\n",
       "      <td>2038</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>28</td>\n",
       "      <td>176635</td>\n",
       "      <td>M. Özil</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/176635.png</td>\n",
       "      <td>Germany</td>\n",
       "      <td>https://cdn.sofifa.org/flags/21.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>Arsenal</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1.png</td>\n",
       "      <td>€60M</td>\n",
       "      <td>€265K</td>\n",
       "      <td>1927</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>29</td>\n",
       "      <td>167948</td>\n",
       "      <td>H. Lloris</td>\n",
       "      <td>30</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/167948.png</td>\n",
       "      <td>France</td>\n",
       "      <td>https://cdn.sofifa.org/flags/18.png</td>\n",
       "      <td>88</td>\n",
       "      <td>88</td>\n",
       "      <td>Tottenham Hotspur</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/18.png</td>\n",
       "      <td>€38M</td>\n",
       "      <td>€165K</td>\n",
       "      <td>1318</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17951</th>\n",
       "      <td>17951</td>\n",
       "      <td>221669</td>\n",
       "      <td>M. Hurst</td>\n",
       "      <td>21</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/221669.png</td>\n",
       "      <td>Scotland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/42.png</td>\n",
       "      <td>48</td>\n",
       "      <td>58</td>\n",
       "      <td>St. Johnstone FC</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/100804.png</td>\n",
       "      <td>€40K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>991</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17952</th>\n",
       "      <td>17952</td>\n",
       "      <td>239079</td>\n",
       "      <td>A. Osmanoski</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/239079.png</td>\n",
       "      <td>FYR Macedonia</td>\n",
       "      <td>https://cdn.sofifa.org/flags/19.png</td>\n",
       "      <td>48</td>\n",
       "      <td>68</td>\n",
       "      <td>SpVgg Unterhaching</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/172.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1377</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17953</th>\n",
       "      <td>17953</td>\n",
       "      <td>238833</td>\n",
       "      <td>K. Cotter</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238833.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>48</td>\n",
       "      <td>67</td>\n",
       "      <td>Luton Town</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1923.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1329</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17954</th>\n",
       "      <td>17954</td>\n",
       "      <td>225778</td>\n",
       "      <td>T. Robinson</td>\n",
       "      <td>19</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/225778.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>48</td>\n",
       "      <td>64</td>\n",
       "      <td>Bradford City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1804.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17955</th>\n",
       "      <td>17955</td>\n",
       "      <td>231928</td>\n",
       "      <td>R. Hughes</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/231928.png</td>\n",
       "      <td>Scotland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/42.png</td>\n",
       "      <td>48</td>\n",
       "      <td>63</td>\n",
       "      <td>Hamilton Academical FC</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/184.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1330</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17956</th>\n",
       "      <td>17956</td>\n",
       "      <td>240381</td>\n",
       "      <td>Z. Mohammed</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/240381.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>48</td>\n",
       "      <td>64</td>\n",
       "      <td>Accrington Stanley</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/110313.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1167</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17957</th>\n",
       "      <td>17957</td>\n",
       "      <td>236807</td>\n",
       "      <td>D. Peppard</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/236807.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>61</td>\n",
       "      <td>Bohemian FC</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/305.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17958</th>\n",
       "      <td>17958</td>\n",
       "      <td>237859</td>\n",
       "      <td>C. Rogers</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/237859.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>59</td>\n",
       "      <td>Bray Wanderers</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/838.png</td>\n",
       "      <td>€40K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1189</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17959</th>\n",
       "      <td>17959</td>\n",
       "      <td>225319</td>\n",
       "      <td>N. McLaughlin</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/225319.png</td>\n",
       "      <td>Scotland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/42.png</td>\n",
       "      <td>47</td>\n",
       "      <td>64</td>\n",
       "      <td>Partick Thistle F.C.</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1754.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1330</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17960</th>\n",
       "      <td>17960</td>\n",
       "      <td>236597</td>\n",
       "      <td>L. Kiely</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/236597.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>69</td>\n",
       "      <td>Shamrock Rovers</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/306.png</td>\n",
       "      <td>€70K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17961</th>\n",
       "      <td>17961</td>\n",
       "      <td>233047</td>\n",
       "      <td>J. Latibeaudiere</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/233047.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>47</td>\n",
       "      <td>73</td>\n",
       "      <td>Manchester City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/10.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€5K</td>\n",
       "      <td>1132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17962</th>\n",
       "      <td>17962</td>\n",
       "      <td>236425</td>\n",
       "      <td>J. Payne</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/236425.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>47</td>\n",
       "      <td>63</td>\n",
       "      <td>Barnet</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/135.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17963</th>\n",
       "      <td>17963</td>\n",
       "      <td>238217</td>\n",
       "      <td>G. Manley</td>\n",
       "      <td>19</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238217.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>58</td>\n",
       "      <td>Cork City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/422.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1298</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17964</th>\n",
       "      <td>17964</td>\n",
       "      <td>238985</td>\n",
       "      <td>P. Phillips</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238985.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>Cork City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/422.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17965</th>\n",
       "      <td>17965</td>\n",
       "      <td>238219</td>\n",
       "      <td>A. Byrne</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238219.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>61</td>\n",
       "      <td>Cork City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/422.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1346</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17966</th>\n",
       "      <td>17966</td>\n",
       "      <td>238477</td>\n",
       "      <td>K. Fujikawa</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238477.png</td>\n",
       "      <td>Japan</td>\n",
       "      <td>https://cdn.sofifa.org/flags/163.png</td>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>Júbilo Iwata</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/101144.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17967</th>\n",
       "      <td>17967</td>\n",
       "      <td>231824</td>\n",
       "      <td>K. Egan</td>\n",
       "      <td>19</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/231824.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>Exeter City</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/143.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1225</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17968</th>\n",
       "      <td>17968</td>\n",
       "      <td>237974</td>\n",
       "      <td>T. Brownsword</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/237974.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>47</td>\n",
       "      <td>68</td>\n",
       "      <td>Morecambe</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/357.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1143</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17969</th>\n",
       "      <td>17969</td>\n",
       "      <td>236954</td>\n",
       "      <td>F. Prohart</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/236954.png</td>\n",
       "      <td>Austria</td>\n",
       "      <td>https://cdn.sofifa.org/flags/4.png</td>\n",
       "      <td>47</td>\n",
       "      <td>67</td>\n",
       "      <td>Wolfsberger AC</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/111822.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1238</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17970</th>\n",
       "      <td>17970</td>\n",
       "      <td>231107</td>\n",
       "      <td>A. Kilgour</td>\n",
       "      <td>19</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/231107.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>47</td>\n",
       "      <td>56</td>\n",
       "      <td>Bristol Rovers</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1962.png</td>\n",
       "      <td>€40K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17971</th>\n",
       "      <td>17971</td>\n",
       "      <td>240325</td>\n",
       "      <td>R. White</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/240325.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>47</td>\n",
       "      <td>65</td>\n",
       "      <td>Bolton Wanderers</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/4.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€2K</td>\n",
       "      <td>1265</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17972</th>\n",
       "      <td>17972</td>\n",
       "      <td>238306</td>\n",
       "      <td>A. Conway</td>\n",
       "      <td>19</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238306.png</td>\n",
       "      <td>Republic of Ireland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/25.png</td>\n",
       "      <td>47</td>\n",
       "      <td>63</td>\n",
       "      <td>Galway United</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1571.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1314</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17973</th>\n",
       "      <td>17973</td>\n",
       "      <td>240403</td>\n",
       "      <td>T. Sawyer</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/240403.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>46</td>\n",
       "      <td>58</td>\n",
       "      <td>Grimsby Town</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/92.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1267</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17974</th>\n",
       "      <td>17974</td>\n",
       "      <td>240404</td>\n",
       "      <td>J. Keeble</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/240404.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>46</td>\n",
       "      <td>56</td>\n",
       "      <td>Grimsby Town</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/92.png</td>\n",
       "      <td>€40K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1105</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17975</th>\n",
       "      <td>17975</td>\n",
       "      <td>235352</td>\n",
       "      <td>T. Käßemodel</td>\n",
       "      <td>28</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/235352.png</td>\n",
       "      <td>Germany</td>\n",
       "      <td>https://cdn.sofifa.org/flags/21.png</td>\n",
       "      <td>46</td>\n",
       "      <td>46</td>\n",
       "      <td>FC Erzgebirge Aue</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/506.png</td>\n",
       "      <td>€30K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17976</th>\n",
       "      <td>17976</td>\n",
       "      <td>237463</td>\n",
       "      <td>A. Kelsey</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/237463.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>46</td>\n",
       "      <td>63</td>\n",
       "      <td>Scunthorpe United</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1949.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>755</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17977</th>\n",
       "      <td>17977</td>\n",
       "      <td>11728</td>\n",
       "      <td>B. Richardson</td>\n",
       "      <td>47</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/11728.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>46</td>\n",
       "      <td>46</td>\n",
       "      <td>Wycombe Wanderers</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1933.png</td>\n",
       "      <td>€0</td>\n",
       "      <td>€1K</td>\n",
       "      <td>832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17978</th>\n",
       "      <td>17978</td>\n",
       "      <td>231381</td>\n",
       "      <td>J. Young</td>\n",
       "      <td>17</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/231381.png</td>\n",
       "      <td>Scotland</td>\n",
       "      <td>https://cdn.sofifa.org/flags/42.png</td>\n",
       "      <td>46</td>\n",
       "      <td>61</td>\n",
       "      <td>Swindon Town</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1934.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1194</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17979</th>\n",
       "      <td>17979</td>\n",
       "      <td>238813</td>\n",
       "      <td>J. Lundstram</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238813.png</td>\n",
       "      <td>England</td>\n",
       "      <td>https://cdn.sofifa.org/flags/14.png</td>\n",
       "      <td>46</td>\n",
       "      <td>64</td>\n",
       "      <td>Crewe Alexandra</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/121.png</td>\n",
       "      <td>€60K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17980</th>\n",
       "      <td>17980</td>\n",
       "      <td>238308</td>\n",
       "      <td>L. Sackey</td>\n",
       "      <td>18</td>\n",
       "      <td>https://cdn.sofifa.org/48/18/players/238308.png</td>\n",
       "      <td>Ghana</td>\n",
       "      <td>https://cdn.sofifa.org/flags/117.png</td>\n",
       "      <td>46</td>\n",
       "      <td>64</td>\n",
       "      <td>Scunthorpe United</td>\n",
       "      <td>https://cdn.sofifa.org/24/18/teams/1949.png</td>\n",
       "      <td>€50K</td>\n",
       "      <td>€1K</td>\n",
       "      <td>1031</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>17981 rows × 14 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       Unnamed: 0      ID               Name  Age  \\\n",
       "0               0   20801  Cristiano Ronaldo   32   \n",
       "1               1  158023           L. Messi   30   \n",
       "2               2  190871             Neymar   25   \n",
       "3               3  176580          L. Suárez   30   \n",
       "4               4  167495           M. Neuer   31   \n",
       "5               5  188545     R. Lewandowski   28   \n",
       "6               6  193080             De Gea   26   \n",
       "7               7  183277          E. Hazard   26   \n",
       "8               8  182521           T. Kroos   27   \n",
       "9               9  167664         G. Higuaín   29   \n",
       "10             10  155862       Sergio Ramos   31   \n",
       "11             11  192985       K. De Bruyne   26   \n",
       "12             12  192119        T. Courtois   25   \n",
       "13             13  184941         A. Sánchez   28   \n",
       "14             14  177003          L. Modrić   31   \n",
       "15             15  173731            G. Bale   27   \n",
       "16             16  153079          S. Agüero   29   \n",
       "17             17  138956       G. Chiellini   32   \n",
       "18             18    1179          G. Buffon   39   \n",
       "19             19  211110          P. Dybala   23   \n",
       "20             20  200389           J. Oblak   24   \n",
       "21             21  194765       A. Griezmann   26   \n",
       "22             22  189509             Thiago   26   \n",
       "23             23  188567      P. Aubameyang   28   \n",
       "24             24  184344         L. Bonucci   30   \n",
       "25             25  183907         J. Boateng   28   \n",
       "26             26  182493           D. Godín   31   \n",
       "27             27  178603         M. Hummels   28   \n",
       "28             28  176635            M. Özil   28   \n",
       "29             29  167948          H. Lloris   30   \n",
       "...           ...     ...                ...  ...   \n",
       "17951       17951  221669           M. Hurst   21   \n",
       "17952       17952  239079       A. Osmanoski   17   \n",
       "17953       17953  238833          K. Cotter   18   \n",
       "17954       17954  225778        T. Robinson   19   \n",
       "17955       17955  231928          R. Hughes   18   \n",
       "17956       17956  240381        Z. Mohammed   17   \n",
       "17957       17957  236807         D. Peppard   17   \n",
       "17958       17958  237859          C. Rogers   17   \n",
       "17959       17959  225319      N. McLaughlin   18   \n",
       "17960       17960  236597           L. Kiely   18   \n",
       "17961       17961  233047   J. Latibeaudiere   17   \n",
       "17962       17962  236425           J. Payne   18   \n",
       "17963       17963  238217          G. Manley   19   \n",
       "17964       17964  238985        P. Phillips   18   \n",
       "17965       17965  238219           A. Byrne   18   \n",
       "17966       17966  238477        K. Fujikawa   18   \n",
       "17967       17967  231824            K. Egan   19   \n",
       "17968       17968  237974      T. Brownsword   17   \n",
       "17969       17969  236954         F. Prohart   18   \n",
       "17970       17970  231107         A. Kilgour   19   \n",
       "17971       17971  240325           R. White   18   \n",
       "17972       17972  238306          A. Conway   19   \n",
       "17973       17973  240403          T. Sawyer   18   \n",
       "17974       17974  240404          J. Keeble   18   \n",
       "17975       17975  235352       T. Käßemodel   28   \n",
       "17976       17976  237463          A. Kelsey   17   \n",
       "17977       17977   11728      B. Richardson   47   \n",
       "17978       17978  231381           J. Young   17   \n",
       "17979       17979  238813       J. Lundstram   18   \n",
       "17980       17980  238308          L. Sackey   18   \n",
       "\n",
       "                                                 Photo          Nationality  \\\n",
       "0       https://cdn.sofifa.org/48/18/players/20801.png             Portugal   \n",
       "1      https://cdn.sofifa.org/48/18/players/158023.png            Argentina   \n",
       "2      https://cdn.sofifa.org/48/18/players/190871.png               Brazil   \n",
       "3      https://cdn.sofifa.org/48/18/players/176580.png              Uruguay   \n",
       "4      https://cdn.sofifa.org/48/18/players/167495.png              Germany   \n",
       "5      https://cdn.sofifa.org/48/18/players/188545.png               Poland   \n",
       "6      https://cdn.sofifa.org/48/18/players/193080.png                Spain   \n",
       "7      https://cdn.sofifa.org/48/18/players/183277.png              Belgium   \n",
       "8      https://cdn.sofifa.org/48/18/players/182521.png              Germany   \n",
       "9      https://cdn.sofifa.org/48/18/players/167664.png            Argentina   \n",
       "10     https://cdn.sofifa.org/48/18/players/155862.png                Spain   \n",
       "11     https://cdn.sofifa.org/48/18/players/192985.png              Belgium   \n",
       "12     https://cdn.sofifa.org/48/18/players/192119.png              Belgium   \n",
       "13     https://cdn.sofifa.org/48/18/players/184941.png                Chile   \n",
       "14     https://cdn.sofifa.org/48/18/players/177003.png              Croatia   \n",
       "15     https://cdn.sofifa.org/48/18/players/173731.png                Wales   \n",
       "16     https://cdn.sofifa.org/48/18/players/153079.png            Argentina   \n",
       "17     https://cdn.sofifa.org/48/18/players/138956.png                Italy   \n",
       "18       https://cdn.sofifa.org/48/18/players/1179.png                Italy   \n",
       "19     https://cdn.sofifa.org/48/18/players/211110.png            Argentina   \n",
       "20     https://cdn.sofifa.org/48/18/players/200389.png             Slovenia   \n",
       "21     https://cdn.sofifa.org/48/18/players/194765.png               France   \n",
       "22     https://cdn.sofifa.org/48/18/players/189509.png                Spain   \n",
       "23     https://cdn.sofifa.org/48/18/players/188567.png                Gabon   \n",
       "24     https://cdn.sofifa.org/48/18/players/184344.png                Italy   \n",
       "25     https://cdn.sofifa.org/48/18/players/183907.png              Germany   \n",
       "26     https://cdn.sofifa.org/48/18/players/182493.png              Uruguay   \n",
       "27     https://cdn.sofifa.org/48/18/players/178603.png              Germany   \n",
       "28     https://cdn.sofifa.org/48/18/players/176635.png              Germany   \n",
       "29     https://cdn.sofifa.org/48/18/players/167948.png               France   \n",
       "...                                                ...                  ...   \n",
       "17951  https://cdn.sofifa.org/48/18/players/221669.png             Scotland   \n",
       "17952  https://cdn.sofifa.org/48/18/players/239079.png        FYR Macedonia   \n",
       "17953  https://cdn.sofifa.org/48/18/players/238833.png              England   \n",
       "17954  https://cdn.sofifa.org/48/18/players/225778.png              England   \n",
       "17955  https://cdn.sofifa.org/48/18/players/231928.png             Scotland   \n",
       "17956  https://cdn.sofifa.org/48/18/players/240381.png              England   \n",
       "17957  https://cdn.sofifa.org/48/18/players/236807.png  Republic of Ireland   \n",
       "17958  https://cdn.sofifa.org/48/18/players/237859.png  Republic of Ireland   \n",
       "17959  https://cdn.sofifa.org/48/18/players/225319.png             Scotland   \n",
       "17960  https://cdn.sofifa.org/48/18/players/236597.png  Republic of Ireland   \n",
       "17961  https://cdn.sofifa.org/48/18/players/233047.png              England   \n",
       "17962  https://cdn.sofifa.org/48/18/players/236425.png              England   \n",
       "17963  https://cdn.sofifa.org/48/18/players/238217.png  Republic of Ireland   \n",
       "17964  https://cdn.sofifa.org/48/18/players/238985.png  Republic of Ireland   \n",
       "17965  https://cdn.sofifa.org/48/18/players/238219.png  Republic of Ireland   \n",
       "17966  https://cdn.sofifa.org/48/18/players/238477.png                Japan   \n",
       "17967  https://cdn.sofifa.org/48/18/players/231824.png              England   \n",
       "17968  https://cdn.sofifa.org/48/18/players/237974.png              England   \n",
       "17969  https://cdn.sofifa.org/48/18/players/236954.png              Austria   \n",
       "17970  https://cdn.sofifa.org/48/18/players/231107.png              England   \n",
       "17971  https://cdn.sofifa.org/48/18/players/240325.png              England   \n",
       "17972  https://cdn.sofifa.org/48/18/players/238306.png  Republic of Ireland   \n",
       "17973  https://cdn.sofifa.org/48/18/players/240403.png              England   \n",
       "17974  https://cdn.sofifa.org/48/18/players/240404.png              England   \n",
       "17975  https://cdn.sofifa.org/48/18/players/235352.png              Germany   \n",
       "17976  https://cdn.sofifa.org/48/18/players/237463.png              England   \n",
       "17977   https://cdn.sofifa.org/48/18/players/11728.png              England   \n",
       "17978  https://cdn.sofifa.org/48/18/players/231381.png             Scotland   \n",
       "17979  https://cdn.sofifa.org/48/18/players/238813.png              England   \n",
       "17980  https://cdn.sofifa.org/48/18/players/238308.png                Ghana   \n",
       "\n",
       "                                       Flag  Overall  Potential  \\\n",
       "0       https://cdn.sofifa.org/flags/38.png       94         94   \n",
       "1       https://cdn.sofifa.org/flags/52.png       93         93   \n",
       "2       https://cdn.sofifa.org/flags/54.png       92         94   \n",
       "3       https://cdn.sofifa.org/flags/60.png       92         92   \n",
       "4       https://cdn.sofifa.org/flags/21.png       92         92   \n",
       "5       https://cdn.sofifa.org/flags/37.png       91         91   \n",
       "6       https://cdn.sofifa.org/flags/45.png       90         92   \n",
       "7        https://cdn.sofifa.org/flags/7.png       90         91   \n",
       "8       https://cdn.sofifa.org/flags/21.png       90         90   \n",
       "9       https://cdn.sofifa.org/flags/52.png       90         90   \n",
       "10      https://cdn.sofifa.org/flags/45.png       90         90   \n",
       "11       https://cdn.sofifa.org/flags/7.png       89         92   \n",
       "12       https://cdn.sofifa.org/flags/7.png       89         92   \n",
       "13      https://cdn.sofifa.org/flags/55.png       89         89   \n",
       "14      https://cdn.sofifa.org/flags/10.png       89         89   \n",
       "15      https://cdn.sofifa.org/flags/50.png       89         89   \n",
       "16      https://cdn.sofifa.org/flags/52.png       89         89   \n",
       "17      https://cdn.sofifa.org/flags/27.png       89         89   \n",
       "18      https://cdn.sofifa.org/flags/27.png       89         89   \n",
       "19      https://cdn.sofifa.org/flags/52.png       88         93   \n",
       "20      https://cdn.sofifa.org/flags/44.png       88         93   \n",
       "21      https://cdn.sofifa.org/flags/18.png       88         91   \n",
       "22      https://cdn.sofifa.org/flags/45.png       88         90   \n",
       "23     https://cdn.sofifa.org/flags/115.png       88         88   \n",
       "24      https://cdn.sofifa.org/flags/27.png       88         88   \n",
       "25      https://cdn.sofifa.org/flags/21.png       88         88   \n",
       "26      https://cdn.sofifa.org/flags/60.png       88         88   \n",
       "27      https://cdn.sofifa.org/flags/21.png       88         88   \n",
       "28      https://cdn.sofifa.org/flags/21.png       88         88   \n",
       "29      https://cdn.sofifa.org/flags/18.png       88         88   \n",
       "...                                     ...      ...        ...   \n",
       "17951   https://cdn.sofifa.org/flags/42.png       48         58   \n",
       "17952   https://cdn.sofifa.org/flags/19.png       48         68   \n",
       "17953   https://cdn.sofifa.org/flags/14.png       48         67   \n",
       "17954   https://cdn.sofifa.org/flags/14.png       48         64   \n",
       "17955   https://cdn.sofifa.org/flags/42.png       48         63   \n",
       "17956   https://cdn.sofifa.org/flags/14.png       48         64   \n",
       "17957   https://cdn.sofifa.org/flags/25.png       47         61   \n",
       "17958   https://cdn.sofifa.org/flags/25.png       47         59   \n",
       "17959   https://cdn.sofifa.org/flags/42.png       47         64   \n",
       "17960   https://cdn.sofifa.org/flags/25.png       47         69   \n",
       "17961   https://cdn.sofifa.org/flags/14.png       47         73   \n",
       "17962   https://cdn.sofifa.org/flags/14.png       47         63   \n",
       "17963   https://cdn.sofifa.org/flags/25.png       47         58   \n",
       "17964   https://cdn.sofifa.org/flags/25.png       47         67   \n",
       "17965   https://cdn.sofifa.org/flags/25.png       47         61   \n",
       "17966  https://cdn.sofifa.org/flags/163.png       47         67   \n",
       "17967   https://cdn.sofifa.org/flags/14.png       47         67   \n",
       "17968   https://cdn.sofifa.org/flags/14.png       47         68   \n",
       "17969    https://cdn.sofifa.org/flags/4.png       47         67   \n",
       "17970   https://cdn.sofifa.org/flags/14.png       47         56   \n",
       "17971   https://cdn.sofifa.org/flags/14.png       47         65   \n",
       "17972   https://cdn.sofifa.org/flags/25.png       47         63   \n",
       "17973   https://cdn.sofifa.org/flags/14.png       46         58   \n",
       "17974   https://cdn.sofifa.org/flags/14.png       46         56   \n",
       "17975   https://cdn.sofifa.org/flags/21.png       46         46   \n",
       "17976   https://cdn.sofifa.org/flags/14.png       46         63   \n",
       "17977   https://cdn.sofifa.org/flags/14.png       46         46   \n",
       "17978   https://cdn.sofifa.org/flags/42.png       46         61   \n",
       "17979   https://cdn.sofifa.org/flags/14.png       46         64   \n",
       "17980  https://cdn.sofifa.org/flags/117.png       46         64   \n",
       "\n",
       "                         Club                                      Club Logo  \\\n",
       "0              Real Madrid CF     https://cdn.sofifa.org/24/18/teams/243.png   \n",
       "1                FC Barcelona     https://cdn.sofifa.org/24/18/teams/241.png   \n",
       "2         Paris Saint-Germain      https://cdn.sofifa.org/24/18/teams/73.png   \n",
       "3                FC Barcelona     https://cdn.sofifa.org/24/18/teams/241.png   \n",
       "4            FC Bayern Munich      https://cdn.sofifa.org/24/18/teams/21.png   \n",
       "5            FC Bayern Munich      https://cdn.sofifa.org/24/18/teams/21.png   \n",
       "6           Manchester United      https://cdn.sofifa.org/24/18/teams/11.png   \n",
       "7                     Chelsea       https://cdn.sofifa.org/24/18/teams/5.png   \n",
       "8              Real Madrid CF     https://cdn.sofifa.org/24/18/teams/243.png   \n",
       "9                    Juventus      https://cdn.sofifa.org/24/18/teams/45.png   \n",
       "10             Real Madrid CF     https://cdn.sofifa.org/24/18/teams/243.png   \n",
       "11            Manchester City      https://cdn.sofifa.org/24/18/teams/10.png   \n",
       "12                    Chelsea       https://cdn.sofifa.org/24/18/teams/5.png   \n",
       "13                    Arsenal       https://cdn.sofifa.org/24/18/teams/1.png   \n",
       "14             Real Madrid CF     https://cdn.sofifa.org/24/18/teams/243.png   \n",
       "15             Real Madrid CF     https://cdn.sofifa.org/24/18/teams/243.png   \n",
       "16            Manchester City      https://cdn.sofifa.org/24/18/teams/10.png   \n",
       "17                   Juventus      https://cdn.sofifa.org/24/18/teams/45.png   \n",
       "18                   Juventus      https://cdn.sofifa.org/24/18/teams/45.png   \n",
       "19                   Juventus      https://cdn.sofifa.org/24/18/teams/45.png   \n",
       "20            Atlético Madrid     https://cdn.sofifa.org/24/18/teams/240.png   \n",
       "21            Atlético Madrid     https://cdn.sofifa.org/24/18/teams/240.png   \n",
       "22           FC Bayern Munich      https://cdn.sofifa.org/24/18/teams/21.png   \n",
       "23          Borussia Dortmund      https://cdn.sofifa.org/24/18/teams/22.png   \n",
       "24                      Milan      https://cdn.sofifa.org/24/18/teams/47.png   \n",
       "25           FC Bayern Munich      https://cdn.sofifa.org/24/18/teams/21.png   \n",
       "26            Atlético Madrid     https://cdn.sofifa.org/24/18/teams/240.png   \n",
       "27           FC Bayern Munich      https://cdn.sofifa.org/24/18/teams/21.png   \n",
       "28                    Arsenal       https://cdn.sofifa.org/24/18/teams/1.png   \n",
       "29          Tottenham Hotspur      https://cdn.sofifa.org/24/18/teams/18.png   \n",
       "...                       ...                                            ...   \n",
       "17951        St. Johnstone FC  https://cdn.sofifa.org/24/18/teams/100804.png   \n",
       "17952      SpVgg Unterhaching     https://cdn.sofifa.org/24/18/teams/172.png   \n",
       "17953              Luton Town    https://cdn.sofifa.org/24/18/teams/1923.png   \n",
       "17954           Bradford City    https://cdn.sofifa.org/24/18/teams/1804.png   \n",
       "17955  Hamilton Academical FC     https://cdn.sofifa.org/24/18/teams/184.png   \n",
       "17956      Accrington Stanley  https://cdn.sofifa.org/24/18/teams/110313.png   \n",
       "17957             Bohemian FC     https://cdn.sofifa.org/24/18/teams/305.png   \n",
       "17958          Bray Wanderers     https://cdn.sofifa.org/24/18/teams/838.png   \n",
       "17959    Partick Thistle F.C.    https://cdn.sofifa.org/24/18/teams/1754.png   \n",
       "17960         Shamrock Rovers     https://cdn.sofifa.org/24/18/teams/306.png   \n",
       "17961         Manchester City      https://cdn.sofifa.org/24/18/teams/10.png   \n",
       "17962                  Barnet     https://cdn.sofifa.org/24/18/teams/135.png   \n",
       "17963               Cork City     https://cdn.sofifa.org/24/18/teams/422.png   \n",
       "17964               Cork City     https://cdn.sofifa.org/24/18/teams/422.png   \n",
       "17965               Cork City     https://cdn.sofifa.org/24/18/teams/422.png   \n",
       "17966            Júbilo Iwata  https://cdn.sofifa.org/24/18/teams/101144.png   \n",
       "17967             Exeter City     https://cdn.sofifa.org/24/18/teams/143.png   \n",
       "17968               Morecambe     https://cdn.sofifa.org/24/18/teams/357.png   \n",
       "17969          Wolfsberger AC  https://cdn.sofifa.org/24/18/teams/111822.png   \n",
       "17970          Bristol Rovers    https://cdn.sofifa.org/24/18/teams/1962.png   \n",
       "17971        Bolton Wanderers       https://cdn.sofifa.org/24/18/teams/4.png   \n",
       "17972           Galway United    https://cdn.sofifa.org/24/18/teams/1571.png   \n",
       "17973            Grimsby Town      https://cdn.sofifa.org/24/18/teams/92.png   \n",
       "17974            Grimsby Town      https://cdn.sofifa.org/24/18/teams/92.png   \n",
       "17975       FC Erzgebirge Aue     https://cdn.sofifa.org/24/18/teams/506.png   \n",
       "17976       Scunthorpe United    https://cdn.sofifa.org/24/18/teams/1949.png   \n",
       "17977       Wycombe Wanderers    https://cdn.sofifa.org/24/18/teams/1933.png   \n",
       "17978            Swindon Town    https://cdn.sofifa.org/24/18/teams/1934.png   \n",
       "17979         Crewe Alexandra     https://cdn.sofifa.org/24/18/teams/121.png   \n",
       "17980       Scunthorpe United    https://cdn.sofifa.org/24/18/teams/1949.png   \n",
       "\n",
       "        Value   Wage  Special  \n",
       "0      €95.5M  €565K     2228  \n",
       "1       €105M  €565K     2154  \n",
       "2       €123M  €280K     2100  \n",
       "3        €97M  €510K     2291  \n",
       "4        €61M  €230K     1493  \n",
       "5        €92M  €355K     2143  \n",
       "6      €64.5M  €215K     1458  \n",
       "7      €90.5M  €295K     2096  \n",
       "8        €79M  €340K     2165  \n",
       "9        €77M  €275K     1961  \n",
       "10       €52M  €310K     2153  \n",
       "11       €83M  €285K     2162  \n",
       "12       €59M  €190K     1282  \n",
       "13     €67.5M  €265K     2181  \n",
       "14       €57M  €340K     2228  \n",
       "15     €69.5M  €370K     2263  \n",
       "16     €66.5M  €325K     2074  \n",
       "17       €38M  €225K     1867  \n",
       "18      €4.5M  €110K     1335  \n",
       "19       €79M  €215K     2063  \n",
       "20       €57M   €82K     1290  \n",
       "21       €75M  €150K     2104  \n",
       "22     €70.5M  €225K     2185  \n",
       "23       €61M  €165K     2078  \n",
       "24       €44M  €210K     1995  \n",
       "25       €48M  €215K     1989  \n",
       "26       €40M  €125K     1930  \n",
       "27       €48M  €215K     2038  \n",
       "28       €60M  €265K     1927  \n",
       "29       €38M  €165K     1318  \n",
       "...       ...    ...      ...  \n",
       "17951    €40K    €1K      991  \n",
       "17952    €60K    €1K     1377  \n",
       "17953    €60K    €1K     1329  \n",
       "17954    €60K    €1K     1257  \n",
       "17955    €60K    €1K     1330  \n",
       "17956    €50K    €1K     1167  \n",
       "17957    €50K    €1K     1199  \n",
       "17958    €40K    €1K     1189  \n",
       "17959    €60K    €1K     1330  \n",
       "17960    €70K    €1K     1290  \n",
       "17961    €60K    €5K     1132  \n",
       "17962    €50K    €1K     1219  \n",
       "17963    €50K    €1K     1298  \n",
       "17964    €60K    €1K     1297  \n",
       "17965    €60K    €1K     1346  \n",
       "17966    €60K    €1K     1317  \n",
       "17967    €60K    €1K     1225  \n",
       "17968    €60K    €1K     1143  \n",
       "17969    €60K    €1K     1238  \n",
       "17970    €40K    €1K     1208  \n",
       "17971    €60K    €2K     1265  \n",
       "17972    €60K    €1K     1314  \n",
       "17973    €50K    €1K     1267  \n",
       "17974    €40K    €1K     1105  \n",
       "17975    €30K    €1K     1174  \n",
       "17976    €50K    €1K      755  \n",
       "17977      €0    €1K      832  \n",
       "17978    €60K    €1K     1194  \n",
       "17979    €60K    €1K     1302  \n",
       "17980    €50K    €1K     1031  \n",
       "\n",
       "[17981 rows x 14 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "data.to_csv('Complete/basicplayerdata.csv', encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "player_data_url = 'https://sofifa.com/player/'\n",
    "r = 0\n",
    "for index, row in data.iterrows():\n",
    "    skill_names = []\n",
    "    skill_map = {'ID' : str(row['ID'])}\n",
    "    url = player_data_url + str(row['ID'])\n",
    "    source_code = requests.get(url)\n",
    "    plain_text = source_code.text\n",
    "    soup = BeautifulSoup(plain_text)\n",
    "    categories = soup.findAll('div', {'class': 'col-3'})\n",
    "    for category in categories[:-1]:\n",
    "        skills = category.findAll('li')\n",
    "        for skill in skills:\n",
    "            a = skill.text.split()\n",
    "            a.reverse()\n",
    "            value = a.pop()\n",
    "            a.reverse()\n",
    "            n = ' '.join(a)\n",
    "            skill_names.append(n)\n",
    "            skill_map[str(n)] = value\n",
    "    master_data = DataFrame(columns=skill_names)\n",
    "    break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n",
      "3\n",
      "4\n",
      "5\n",
      "6\n",
      "7\n",
      "8\n",
      "9\n",
      "10\n",
      "11\n",
      "12\n",
      "13\n",
      "14\n",
      "15\n",
      "16\n",
      "17\n",
      "18\n",
      "19\n",
      "20\n",
      "21\n",
      "22\n",
      "23\n",
      "24\n",
      "25\n",
      "26\n",
      "27\n",
      "28\n",
      "29\n",
      "30\n",
      "31\n",
      "32\n",
      "33\n",
      "34\n",
      "35\n",
      "36\n",
      "37\n",
      "38\n",
      "39\n",
      "40\n",
      "41\n",
      "42\n",
      "43\n",
      "44\n",
      "45\n",
      "46\n",
      "47\n",
      "48\n",
      "49\n",
      "50\n",
      "51\n",
      "52\n",
      "53\n",
      "54\n",
      "55\n",
      "56\n",
      "57\n",
      "58\n",
      "59\n",
      "60\n",
      "61\n",
      "62\n",
      "63\n",
      "64\n",
      "65\n",
      "66\n",
      "67\n",
      "68\n",
      "69\n",
      "70\n",
      "71\n",
      "72\n",
      "73\n",
      "74\n",
      "75\n",
      "76\n",
      "77\n",
      "78\n",
      "79\n",
      "80\n",
      "81\n",
      "82\n",
      "83\n",
      "84\n",
      "85\n",
      "86\n",
      "87\n",
      "88\n",
      "89\n",
      "90\n",
      "91\n",
      "92\n",
      "93\n",
      "94\n",
      "95\n",
      "96\n",
      "97\n",
      "98\n",
      "99\n",
      "100\n",
      "101\n",
      "102\n",
      "103\n",
      "104\n",
      "105\n",
      "106\n",
      "107\n",
      "108\n",
      "109\n",
      "110\n",
      "111\n",
      "112\n",
      "113\n",
      "114\n",
      "115\n",
      "116\n",
      "117\n",
      "118\n",
      "119\n",
      "120\n",
      "121\n",
      "122\n",
      "123\n",
      "124\n",
      "125\n",
      "126\n",
      "127\n",
      "128\n",
      "129\n",
      "130\n",
      "131\n",
      "132\n",
      "133\n",
      "134\n",
      "135\n",
      "136\n",
      "137\n",
      "138\n",
      "139\n",
      "140\n",
      "141\n",
      "142\n",
      "143\n",
      "144\n",
      "145\n",
      "146\n",
      "147\n",
      "148\n",
      "149\n",
      "150\n",
      "151\n",
      "152\n",
      "153\n",
      "154\n",
      "155\n",
      "156\n",
      "157\n",
      "158\n",
      "159\n",
      "160\n",
      "161\n",
      "162\n",
      "163\n",
      "164\n",
      "165\n",
      "166\n",
      "167\n",
      "168\n",
      "169\n",
      "170\n",
      "171\n",
      "172\n",
      "173\n",
      "174\n",
      "175\n",
      "176\n",
      "177\n",
      "178\n",
      "179\n",
      "180\n",
      "181\n",
      "182\n",
      "183\n",
      "184\n",
      "185\n",
      "186\n",
      "187\n",
      "188\n",
      "189\n",
      "190\n",
      "191\n",
      "192\n",
      "193\n",
      "194\n",
      "195\n",
      "196\n",
      "197\n",
      "198\n",
      "199\n",
      "200\n",
      "201\n",
      "202\n",
      "203\n",
      "204\n",
      "205\n",
      "206\n",
      "207\n",
      "208\n",
      "209\n",
      "210\n",
      "211\n",
      "212\n",
      "213\n",
      "214\n",
      "215\n",
      "216\n",
      "217\n",
      "218\n",
      "219\n",
      "220\n",
      "221\n",
      "222\n",
      "223\n",
      "224\n",
      "225\n",
      "226\n",
      "227\n",
      "228\n",
      "229\n",
      "230\n",
      "231\n",
      "232\n",
      "233\n",
      "234\n",
      "235\n",
      "236\n",
      "237\n",
      "238\n",
      "239\n",
      "240\n",
      "241\n",
      "242\n",
      "243\n",
      "244\n",
      "245\n",
      "246\n",
      "247\n",
      "248\n",
      "249\n",
      "250\n",
      "251\n",
      "252\n",
      "253\n",
      "254\n",
      "255\n",
      "256\n",
      "257\n",
      "258\n",
      "259\n",
      "260\n",
      "261\n",
      "262\n",
      "263\n",
      "264\n",
      "265\n",
      "266\n",
      "267\n",
      "268\n",
      "269\n",
      "270\n",
      "271\n",
      "272\n",
      "273\n",
      "274\n",
      "275\n",
      "276\n",
      "277\n",
      "278\n",
      "279\n",
      "280\n",
      "281\n",
      "282\n",
      "283\n",
      "284\n",
      "285\n",
      "286\n",
      "287\n",
      "288\n",
      "289\n",
      "290\n",
      "291\n",
      "292\n",
      "293\n",
      "294\n",
      "295\n",
      "296\n",
      "297\n",
      "298\n",
      "299\n",
      "300\n",
      "301\n",
      "302\n",
      "303\n",
      "304\n",
      "305\n",
      "306\n",
      "307\n",
      "308\n",
      "309\n",
      "310\n",
      "311\n",
      "312\n",
      "313\n",
      "314\n",
      "315\n",
      "316\n",
      "317\n",
      "318\n",
      "319\n",
      "320\n",
      "321\n",
      "322\n",
      "323\n",
      "324\n",
      "325\n",
      "326\n",
      "327\n",
      "328\n",
      "329\n",
      "330\n",
      "331\n",
      "332\n",
      "333\n",
      "334\n",
      "335\n",
      "336\n",
      "337\n",
      "338\n",
      "339\n",
      "340\n",
      "341\n",
      "342\n",
      "343\n",
      "344\n",
      "345\n",
      "346\n",
      "347\n",
      "348\n",
      "349\n",
      "350\n",
      "351\n",
      "352\n",
      "353\n",
      "354\n",
      "355\n",
      "356\n",
      "357\n",
      "358\n",
      "359\n",
      "360\n",
      "361\n",
      "362\n",
      "363\n",
      "364\n",
      "365\n",
      "366\n",
      "367\n",
      "368\n",
      "369\n",
      "370\n",
      "371\n",
      "372\n",
      "373\n",
      "374\n",
      "375\n",
      "376\n",
      "377\n",
      "378\n",
      "379\n",
      "380\n",
      "381\n",
      "382\n",
      "383\n",
      "384\n",
      "385\n",
      "386\n",
      "387\n",
      "388\n",
      "389\n",
      "390\n",
      "391\n",
      "392\n",
      "393\n",
      "394\n",
      "395\n",
      "396\n",
      "397\n",
      "398\n",
      "399\n",
      "400\n",
      "401\n",
      "402\n",
      "403\n",
      "404\n",
      "405\n",
      "406\n",
      "407\n",
      "408\n",
      "409\n",
      "410\n",
      "411\n",
      "412\n",
      "413\n",
      "414\n",
      "415\n",
      "416\n",
      "417\n",
      "418\n",
      "419\n",
      "420\n",
      "421\n",
      "422\n",
      "423\n",
      "424\n",
      "425\n",
      "426\n",
      "427\n",
      "428\n",
      "429\n",
      "430\n",
      "431\n",
      "432\n",
      "433\n",
      "434\n",
      "435\n",
      "436\n",
      "437\n",
      "438\n",
      "439\n",
      "440\n",
      "441\n",
      "442\n",
      "443\n",
      "444\n",
      "445\n",
      "446\n",
      "447\n",
      "448\n",
      "449\n",
      "450\n",
      "451\n",
      "452\n",
      "453\n",
      "454\n",
      "455\n",
      "456\n",
      "457\n",
      "458\n",
      "459\n",
      "460\n",
      "461\n",
      "462\n",
      "463\n",
      "464\n",
      "465\n",
      "466\n",
      "467\n",
      "468\n",
      "469\n",
      "470\n",
      "471\n",
      "472\n",
      "473\n",
      "474\n",
      "475\n",
      "476\n",
      "477\n",
      "478\n",
      "479\n",
      "480\n",
      "481\n",
      "482\n",
      "483\n",
      "484\n",
      "485\n",
      "486\n",
      "487\n",
      "488\n",
      "489\n",
      "490\n",
      "491\n",
      "492\n",
      "493\n",
      "494\n",
      "495\n",
      "496\n",
      "497\n",
      "498\n",
      "499\n",
      "500\n",
      "501\n",
      "502\n",
      "503\n",
      "504\n",
      "505\n",
      "506\n",
      "507\n",
      "508\n",
      "509\n",
      "510\n",
      "511\n",
      "512\n",
      "513\n",
      "514\n",
      "515\n",
      "516\n",
      "517\n",
      "518\n",
      "519\n",
      "520\n",
      "521\n",
      "522\n",
      "523\n",
      "524\n",
      "525\n",
      "526\n",
      "527\n",
      "528\n",
      "529\n",
      "530\n",
      "531\n",
      "532\n",
      "533\n",
      "534\n",
      "535\n",
      "536\n",
      "537\n",
      "538\n",
      "539\n",
      "540\n",
      "541\n",
      "542\n",
      "543\n",
      "544\n",
      "545\n",
      "546\n",
      "547\n",
      "548\n",
      "549\n",
      "550\n",
      "551\n",
      "552\n",
      "553\n",
      "554\n",
      "555\n",
      "556\n",
      "557\n",
      "558\n",
      "559\n",
      "560\n",
      "561\n",
      "562\n",
      "563\n",
      "564\n",
      "565\n",
      "566\n",
      "567\n",
      "568\n",
      "569\n",
      "570\n",
      "571\n",
      "572\n",
      "573\n",
      "574\n",
      "575\n",
      "576\n",
      "577\n",
      "578\n",
      "579\n",
      "580\n",
      "581\n",
      "582\n",
      "583\n",
      "584\n",
      "585\n",
      "586\n",
      "587\n",
      "588\n",
      "589\n",
      "590\n",
      "591\n",
      "592\n",
      "593\n",
      "594\n",
      "595\n",
      "596\n",
      "597\n",
      "598\n",
      "599\n",
      "600\n",
      "601\n",
      "602\n",
      "603\n",
      "604\n",
      "605\n",
      "606\n",
      "607\n",
      "608\n",
      "609\n",
      "610\n",
      "611\n",
      "612\n",
      "613\n",
      "614\n",
      "615\n",
      "616\n",
      "617\n",
      "618\n",
      "619\n",
      "620\n",
      "621\n",
      "622\n",
      "623\n",
      "624\n",
      "625\n",
      "626\n",
      "627\n",
      "628\n",
      "629\n",
      "630\n",
      "631\n",
      "632\n",
      "633\n",
      "634\n",
      "635\n",
      "636\n",
      "637\n",
      "638\n",
      "639\n",
      "640\n",
      "641\n",
      "642\n",
      "643\n",
      "644\n",
      "645\n",
      "646\n",
      "647\n",
      "648\n",
      "649\n",
      "650\n",
      "651\n",
      "652\n",
      "653\n",
      "654\n",
      "655\n",
      "656\n",
      "657\n",
      "658\n",
      "659\n",
      "660\n",
      "661\n",
      "662\n",
      "663\n",
      "664\n",
      "665\n",
      "666\n",
      "667\n",
      "668\n",
      "669\n",
      "670\n",
      "671\n",
      "672\n",
      "673\n",
      "674\n",
      "675\n",
      "676\n",
      "677\n",
      "678\n",
      "679\n",
      "680\n",
      "681\n",
      "682\n",
      "683\n",
      "684\n",
      "685\n",
      "686\n",
      "687\n",
      "688\n",
      "689\n",
      "690\n",
      "691\n",
      "692\n",
      "693\n",
      "694\n",
      "695\n",
      "696\n",
      "697\n",
      "698\n",
      "699\n",
      "700\n",
      "701\n",
      "702\n",
      "703\n",
      "704\n",
      "705\n",
      "706\n",
      "707\n",
      "708\n",
      "709\n",
      "710\n",
      "711\n",
      "712\n",
      "713\n",
      "714\n",
      "715\n",
      "716\n",
      "717\n",
      "718\n",
      "719\n",
      "720\n",
      "721\n",
      "722\n",
      "723\n",
      "724\n",
      "725\n",
      "726\n",
      "727\n",
      "728\n",
      "729\n",
      "730\n",
      "731\n",
      "732\n",
      "733\n",
      "734\n",
      "735\n",
      "736\n",
      "737\n",
      "738\n",
      "739\n",
      "740\n",
      "741\n",
      "742\n",
      "743\n",
      "744\n",
      "745\n",
      "746\n",
      "747\n",
      "748\n",
      "749\n",
      "750\n",
      "751\n",
      "752\n",
      "753\n",
      "754\n",
      "755\n",
      "756\n",
      "757\n",
      "758\n",
      "759\n",
      "760\n",
      "761\n",
      "762\n",
      "763\n",
      "764\n",
      "765\n",
      "766\n",
      "767\n",
      "768\n",
      "769\n",
      "770\n",
      "771\n",
      "772\n",
      "773\n",
      "774\n",
      "775\n",
      "776\n",
      "777\n",
      "778\n",
      "779\n",
      "780\n",
      "781\n",
      "782\n",
      "783\n",
      "784\n",
      "785\n",
      "786\n",
      "787\n",
      "788\n",
      "789\n",
      "790\n",
      "791\n",
      "792\n",
      "793\n",
      "794\n",
      "795\n",
      "796\n",
      "797\n",
      "798\n",
      "799\n",
      "800\n",
      "801\n",
      "802\n",
      "803\n",
      "804\n",
      "805\n",
      "806\n",
      "807\n",
      "808\n",
      "809\n",
      "810\n",
      "811\n",
      "812\n",
      "813\n",
      "814\n",
      "815\n",
      "816\n",
      "817\n",
      "818\n",
      "819\n",
      "820\n",
      "821\n",
      "822\n",
      "823\n",
      "824\n",
      "825\n",
      "826\n",
      "827\n",
      "828\n",
      "829\n",
      "830\n",
      "831\n",
      "832\n",
      "833\n",
      "834\n",
      "835\n",
      "836\n",
      "837\n",
      "838\n",
      "839\n",
      "840\n",
      "841\n",
      "842\n",
      "843\n",
      "844\n",
      "845\n",
      "846\n",
      "847\n",
      "848\n",
      "849\n",
      "850\n",
      "851\n",
      "852\n",
      "853\n",
      "854\n",
      "855\n",
      "856\n",
      "857\n",
      "858\n",
      "859\n",
      "860\n",
      "861\n",
      "862\n",
      "863\n",
      "864\n",
      "865\n",
      "866\n",
      "867\n",
      "868\n",
      "869\n",
      "870\n",
      "871\n",
      "872\n",
      "873\n",
      "874\n",
      "875\n",
      "876\n",
      "877\n",
      "878\n",
      "879\n",
      "880\n",
      "881\n",
      "882\n",
      "883\n",
      "884\n",
      "885\n",
      "886\n",
      "887\n",
      "888\n",
      "889\n",
      "890\n",
      "891\n",
      "892\n",
      "893\n",
      "894\n",
      "895\n",
      "896\n",
      "897\n",
      "898\n",
      "899\n",
      "900\n",
      "901\n",
      "902\n",
      "903\n",
      "904\n",
      "905\n",
      "906\n",
      "907\n",
      "908\n",
      "909\n",
      "910\n",
      "911\n",
      "912\n",
      "913\n",
      "914\n",
      "915\n",
      "916\n",
      "917\n",
      "918\n",
      "919\n",
      "920\n",
      "921\n",
      "922\n",
      "923\n",
      "924\n",
      "925\n",
      "926\n",
      "927\n",
      "928\n",
      "929\n",
      "930\n",
      "931\n",
      "932\n",
      "933\n",
      "934\n",
      "935\n",
      "936\n",
      "937\n",
      "938\n",
      "939\n",
      "940\n",
      "941\n",
      "942\n",
      "943\n",
      "944\n",
      "945\n",
      "946\n",
      "947\n",
      "948\n",
      "949\n",
      "950\n",
      "951\n",
      "952\n",
      "953\n",
      "954\n",
      "955\n",
      "956\n",
      "957\n",
      "958\n",
      "959\n",
      "960\n",
      "961\n",
      "962\n",
      "963\n",
      "964\n",
      "965\n",
      "966\n",
      "967\n",
      "968\n",
      "969\n",
      "970\n",
      "971\n",
      "972\n",
      "973\n",
      "974\n",
      "975\n",
      "976\n",
      "977\n",
      "978\n",
      "979\n",
      "980\n",
      "981\n",
      "982\n",
      "983\n",
      "984\n",
      "985\n",
      "986\n",
      "987\n",
      "988\n",
      "989\n",
      "990\n",
      "991\n",
      "992\n",
      "993\n",
      "994\n",
      "995\n",
      "996\n",
      "997\n",
      "998\n",
      "999\n",
      "1000\n",
      "1001\n",
      "1002\n",
      "1003\n",
      "1004\n",
      "1005\n",
      "1006\n",
      "1007\n",
      "1008\n",
      "1009\n",
      "1010\n",
      "1011\n",
      "1012\n",
      "1013\n",
      "1014\n",
      "1015\n",
      "1016\n",
      "1017\n",
      "1018\n",
      "1019\n",
      "1020\n",
      "1021\n",
      "1022\n",
      "1023\n",
      "1024\n",
      "1025\n",
      "1026\n",
      "1027\n",
      "1028\n",
      "1029\n",
      "1030\n",
      "1031\n",
      "1032\n",
      "1033\n",
      "1034\n",
      "1035\n",
      "1036\n",
      "1037\n",
      "1038\n",
      "1039\n",
      "1040\n",
      "1041\n",
      "1042\n",
      "1043\n",
      "1044\n",
      "1045\n",
      "1046\n",
      "1047\n",
      "1048\n",
      "1049\n",
      "1050\n",
      "1051\n",
      "1052\n",
      "1053\n",
      "1054\n",
      "1055\n",
      "1056\n",
      "1057\n",
      "1058\n",
      "1059\n",
      "1060\n",
      "1061\n",
      "1062\n",
      "1063\n",
      "1064\n",
      "1065\n",
      "1066\n",
      "1067\n",
      "1068\n",
      "1069\n",
      "1070\n",
      "1071\n",
      "1072\n",
      "1073\n",
      "1074\n",
      "1075\n",
      "1076\n",
      "1077\n",
      "1078\n",
      "1079\n",
      "1080\n",
      "1081\n",
      "1082\n",
      "1083\n",
      "1084\n",
      "1085\n",
      "1086\n",
      "1087\n",
      "1088\n",
      "1089\n",
      "1090\n",
      "1091\n",
      "1092\n",
      "1093\n",
      "1094\n",
      "1095\n",
      "1096\n",
      "1097\n",
      "1098\n",
      "1099\n",
      "1100\n",
      "1101\n",
      "1102\n",
      "1103\n",
      "1104\n",
      "1105\n",
      "1106\n",
      "1107\n",
      "1108\n",
      "1109\n",
      "1110\n",
      "1111\n",
      "1112\n",
      "1113\n",
      "1114\n",
      "1115\n",
      "1116\n",
      "1117\n",
      "1118\n",
      "1119\n",
      "1120\n",
      "1121\n",
      "1122\n",
      "1123\n",
      "1124\n",
      "1125\n",
      "1126\n",
      "1127\n",
      "1128\n",
      "1129\n",
      "1130\n",
      "1131\n",
      "1132\n",
      "1133\n",
      "1134\n",
      "1135\n",
      "1136\n",
      "1137\n",
      "1138\n",
      "1139\n",
      "1140\n",
      "1141\n",
      "1142\n",
      "1143\n",
      "1144\n",
      "1145\n",
      "1146\n",
      "1147\n",
      "1148\n",
      "1149\n",
      "1150\n",
      "1151\n",
      "1152\n",
      "1153\n",
      "1154\n",
      "1155\n",
      "1156\n",
      "1157\n",
      "1158\n",
      "1159\n",
      "1160\n",
      "1161\n",
      "1162\n",
      "1163\n",
      "1164\n",
      "1165\n",
      "1166\n",
      "1167\n",
      "1168\n",
      "1169\n",
      "1170\n",
      "1171\n",
      "1172\n",
      "1173\n",
      "1174\n",
      "1175\n",
      "1176\n",
      "1177\n",
      "1178\n",
      "1179\n",
      "1180\n",
      "1181\n",
      "1182\n",
      "1183\n",
      "1184\n",
      "1185\n",
      "1186\n",
      "1187\n",
      "1188\n",
      "1189\n",
      "1190\n",
      "1191\n",
      "1192\n",
      "1193\n",
      "1194\n",
      "1195\n",
      "1196\n",
      "1197\n",
      "1198\n",
      "1199\n",
      "1200\n",
      "1201\n",
      "1202\n",
      "1203\n",
      "1204\n",
      "1205\n",
      "1206\n",
      "1207\n",
      "1208\n",
      "1209\n",
      "1210\n",
      "1211\n",
      "1212\n",
      "1213\n",
      "1214\n",
      "1215\n",
      "1216\n",
      "1217\n",
      "1218\n",
      "1219\n",
      "1220\n",
      "1221\n",
      "1222\n",
      "1223\n",
      "1224\n",
      "1225\n",
      "1226\n",
      "1227\n",
      "1228\n",
      "1229\n",
      "1230\n",
      "1231\n",
      "1232\n",
      "1233\n",
      "1234\n",
      "1235\n",
      "1236\n",
      "1237\n",
      "1238\n",
      "1239\n",
      "1240\n",
      "1241\n",
      "1242\n",
      "1243\n",
      "1244\n",
      "1245\n",
      "1246\n",
      "1247\n",
      "1248\n",
      "1249\n",
      "1250\n",
      "1251\n",
      "1252\n",
      "1253\n",
      "1254\n",
      "1255\n",
      "1256\n",
      "1257\n",
      "1258\n",
      "1259\n",
      "1260\n",
      "1261\n",
      "1262\n",
      "1263\n",
      "1264\n",
      "1265\n",
      "1266\n",
      "1267\n",
      "1268\n",
      "1269\n",
      "1270\n",
      "1271\n",
      "1272\n",
      "1273\n",
      "1274\n",
      "1275\n",
      "1276\n",
      "1277\n",
      "1278\n",
      "1279\n",
      "1280\n",
      "1281\n",
      "1282\n",
      "1283\n",
      "1284\n",
      "1285\n",
      "1286\n",
      "1287\n"
     ]
    }
   ],
   "source": [
    "player_data_url = 'https://sofifa.com/player/'\n",
    "r = 0\n",
    "for index, row in data.iterrows():\n",
    "    skill_names = []\n",
    "    skill_map = {'ID' : str(row['ID'])}\n",
    "    url = player_data_url + str(row['ID'])\n",
    "    source_code = requests.get(url)\n",
    "    plain_text = source_code.text\n",
    "    soup = BeautifulSoup(plain_text)\n",
    "    categories = soup.findAll('div', {'class': 'col-3'})\n",
    "    for category in categories[:-1]:\n",
    "        skills = category.findAll('li')\n",
    "        for skill in skills:\n",
    "            a = skill.text.split()\n",
    "            a.reverse()\n",
    "            value = a.pop()\n",
    "            a.reverse()\n",
    "            n = ' '.join(a)\n",
    "            skill_names.append(n)\n",
    "            skill_map[str(n)] = value\n",
    "    attr_data = DataFrame(columns=skill_names)\n",
    "    for key in skill_map.keys():\n",
    "        attr_data.loc[r,key] = skill_map[key]\n",
    "    r = r + 1\n",
    "    print(r)\n",
    "    master_data = pd.concat([master_data, attr_data])\n",
    "    if r % 100 == 0:\n",
    "        master_data.to_csv('Complete/PlayerAttributeData.csv', encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "master_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "full_data = pd.merge(data, master_data, left_index=True, right_index=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "full_data.to_csv('Allplayer.csv', encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "master_data.to_csv('Complete/PlayerAttributeData.csv', encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "full_data.to_csv('Complete/Dataset.csv', encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
